package com.foreveross.model;

import java.io.Serializable;
import java.util.Date;

/**
 * 代理ip 模型.
 */
public class ProxyIpModel implements Serializable {


    /**
     * 使用者标识
     */
    private Serializable userId;
    /**
     * 使用后状态，1可用，0不可用
     */
    private Integer useStatus = 1;
    /**
     * 是否已回收
     */
    private Boolean hasRecycle = false;
    /**
     * 创建时间
     */
    private Date createTime = new Date();

    private String ip;

    private int port;
    /**
     * 使用次数
     */
    private int useCount = 0;

    private Object proxyObject;

    public ProxyIpModel() {
    }

    public ProxyIpModel(String ip, int port) {
        super();
        this.ip = ip;
        this.port = port;
    }

    public void countUseCount() {
        this.useCount += 1;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public Serializable getUserId() {
        return userId;
    }

    public void setUserId(Serializable userId) {
        this.userId = userId;
    }

    public Integer getUseStatus() {
        return useStatus;
    }

    public void setUseStatus(Integer useStatus) {
        this.useStatus = useStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getUseCount() {
        return useCount;
    }

    public void setUseCount(int useCount) {
        this.useCount = useCount;
    }

    public Boolean getHasRecycle() {
        return hasRecycle;
    }

    public void setHasRecycle(Boolean hasRecycle) {
        this.hasRecycle = hasRecycle;
    }

}
